﻿package export.hero
{
	
	import base.BaseAddEffect;
	import base.BaseBitmapDataClip;
	import base.BaseBitmapDataPool;
	import base.BaseBullet;
	import base.BaseHero;
	import base.BaseMonster;
	import base.BaseObject;
	
	import com.dusk.util.ResUtil;
	import com.game.data.vo.SkillVO;
	import com.game.engine.MainGame;
	import com.game.event.GameEventType;
	import com.game.manager.EventManager;
	import com.game.manager.SoundManager;
	import com.game.view.component.AccumulatePowerBar;
	import com.greensock.TweenMax;
	
	import export.bullet.EnemyMoveBullet;
	import export.bullet.SpecialEffectBullet;
	
	import flash.display.Sprite;
	import flash.events.KeyboardEvent;
	import flash.geom.Point;
	import flash.utils.getTimer;
	
	public class Role2 extends BaseHero
	{
		
		public function Role2()
		{
			this.hit4_2Point = new Point(-99, -99);
			super();
			this.horizonSpeed = 6;
			this.attackBackInfoDict["hit1"] = {
				"hitMaxCount"    : 999,
				"attackBackSpeed": [-2, -2],
				"attackInterval" : 999,
				"attackKind"     : "physics",
				"addprotection"  : 3.5
			};
			this.attackBackInfoDict["hit2"] = {
				"hitMaxCount"    : 999,
				"attackBackSpeed": [-4, 0],
				"attackInterval" : 4,
				"attackKind"     : "physics",
				"addprotection"  : 1
			};
			this.attackBackInfoDict["hit3"] = {
				"hitMaxCount"    : 999,
				"attackBackSpeed": [-4, -4],
				"attackInterval" : 250,
				"attackKind"     : "physics",
				"addprotection"  : 2
			};
			this.attackBackInfoDict["hit3_2"] = {
				"hitMaxCount"    : 999,
				"attackBackSpeed": [-4, -4],
				"attackInterval" : 250,
				"attackKind"     : "physics",
				"addprotection"  : 1
			};
			this.attackBackInfoDict["hit4"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-8, -3],
				"attackInterval" : 999,
				"attackKind"     : "magic",
				"addprotection"  : 5
			};
			this.attackBackInfoDict["hit5"] = {
				"hitMaxCount"    : 999,
				"attackBackSpeed": [-15, -2],
				"attackInterval" : 16,
				"attackKind"     : "magic",
				"addprotection"  : 3
			};
			this.attackBackInfoDict["hit6"] = {
				"hitMaxCount"    : 99,
				"attackBackSpeed": [-14, -25],
				"attackInterval" : 999,
				"attackKind"     : "physics",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit7"] = {
				"hitMaxCount"    : 99,
				"attackBackSpeed": [-15, 0],
				"attackInterval" : 4,
				"attackKind"     : "magic",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit8"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-8, -2],
				"attackInterval" : 3,
				"attackKind"     : "magic",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit8_2"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-8, -2],
				"attackInterval" : 3,
				"attackKind"     : "magic",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit9_1"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [0, -2],
				"attackInterval" : 999,
				"attackKind"     : "magic",
				"addprotection"  : 2
			};
			this.attackBackInfoDict["hit9_2"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-8, -2],
				"attackInterval" : 5,
				"attackKind"     : "magic",
				"addprotection"  : 2
			};
			this.attackBackInfoDict["hit9_1_2"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [0, -2],
				"attackInterval" : 999,
				"attackKind"     : "magic",
				"addprotection"  : 1
			};
			this.attackBackInfoDict["hit9_2_2"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-8, -2],
				"attackInterval" : 5,
				"attackKind"     : "magic",
				"addprotection"  : 1
			};
			this.exceedPowerSprite = new AccumulatePowerBar(this.colipse.width, 9, this.hit2NeedCount);
			this.exceedPowerSprite.name = "exceedPow";
			this.exceedPowerSprite.x = this.x - this.colipse.width / 2;
			this.exceedPowerSprite.y = this.y - this.colipse.height / 2 - 20;
			this.addChild(this.exceedPowerSprite);
		}
		
		public var role2Shalldow:Role2Shadow;
		private var hit2NeedCount:uint = 48;
		private var hit2CurrentCount:uint = 0;
		private var hit5NeedCount:uint = 48;
		private var hit5CurrentCount:uint = 0;
		private var hit4_2Point:Point;
		private var isHit7Ok:Boolean = false;
		
		override protected function initBBDC():void
		{
			var _loc1_:* = null;
			var _loc2_:* = null;
			var _loc3_:uint = this.getCurClothId();
			var _loc4_:uint = this.getCurWeaponId();
			var _loc5_:Array = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE2_" + _loc3_);
			var _loc6_:Array = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE2_EQUIP_" + _loc4_);
			if (_loc5_)
			{
				_loc1_ = {
					"name"  : "body",
					"source": _loc5_
				};
				_loc2_ = {
					"name"  : "equip",
					"source": _loc6_
				};
				bbdc = new BaseBitmapDataClip([_loc1_, _loc2_], 200, 200, new Point(0, 0));
				bbdc.setOffsetXY(15, 0);
				bbdc.setFrameStopCount([
					[2, 2, 2, 3, 2, 4],
					[2, 2, 2, 14],
					[4, 4, 4, 4],
					[2, 2, 2, 2],
					[1, 1, 30, 55, 15],
					[2, 2, 2, 2, 2],
					[2, 4, 12],
					[2, 10, 2, 20],
					[2, 2],
					[2, 2, 6],
					[48, 2, 15],
					[2, 2, 20],
					[2, 2, 10]
				]);
				bbdc.setFrameCount([36, 4, 4, 4, [1, 1, 1, 1, 1, 1], 5, 3, 4, 24, 3, 3, 3, 3]);
				bbdc.setEnterFrameCallBack(this.enterFrameFunc, this.exitFrameFunc);
				bbdc.setAddScriptWhenFrameOver(this.scriptFrameOverFunc);
				this.bodyContainer.addChild(bbdc);
				this.bbdc.turnRight();
				return;
			}
			throw new Error("ROLE2--BitmapData Error!");
		}
		
		override protected function initCollideArea():void
		{
			this.colipse = (ResUtil.getNewObj("ObjectBaseSprite") as Sprite);
			this.colipse.visible = false;
			this.addChild(this.colipse);
		}
		
		override public function setAction(param1:String):void
		{
			var _loc2_:* = null;
			super.setAction(param1);
			var _loc3_:Point = this.bbdc.getCurPoint();
			switch (param1)
			{
				case "idle":
					if (_loc3_.y != 0)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(0);
					}
					this.bbdc.setState(param1);
					return;
				case "idle2":
					if (_loc3_.y != 1)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(1);
					}
					this.bbdc.setState(param1);
					return;
				case "walk":
					if (_loc3_.y != 2)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(2);
					}
					this.bbdc.setState(param1);
					return;
				case "run":
					if (_loc3_.y != 3)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(3);
					}
					this.bbdc.setState(param1);
					return;
				case "jump1":
					if (!(_loc3_.x == 0) || !(_loc3_.y == 4))
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					return;
				case "jump2":
					if (_loc3_.y != 5)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(5);
					}
					this.bbdc.setState(param1);
					return;
				case "jump3":
					if (!(_loc3_.x == 1) || !(_loc3_.y == 4))
					{
						this.bbdc.setFramePointX(1);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					return;
				case "hit1":
					if (_loc3_.y != 6)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(6);
					}
					this.bbdc.setState(param1);
					return;
				case "hit3":
					if (_loc3_.y != 7)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(7);
					}
					this.bbdc.setState(param1);
					return;
				case "hit4_1":
					if (_loc3_.y != 8)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(8);
					}
					this.bbdc.setState(param1);
					return;
				case "hit4_2":
					for each (_loc2_ in this.magicBulletArray)
					{
						if (_loc2_.name == "Role1Bullet4_1")
						{
							_loc2_.destroy();
						}
					}
					if (_loc3_.y != 9)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(9);
					}
					this.bbdc.setState(param1);
					return;
				case "hit5":
					if (_loc3_.y != 10)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(10);
					}
					this.bbdc.setState(param1);
					return;
				case "hit6":
					if (_loc3_.y != 11)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(11);
					}
					this.bbdc.setState(param1);
					return;
				case "hit7":
					if (!(_loc3_.x == 0) || !(_loc3_.y == 12))
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(12);
					}
					this.bbdc.setState(param1);
					return;
				case "hit8":
					if (!(_loc3_.x == 2) || !(_loc3_.y == 4))
					{
						this.bbdc.setFramePointX(2);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					return;
				case "hit9":
					if (!(_loc3_.x == 3) || !(_loc3_.y == 4))
					{
						this.bbdc.setFramePointX(3);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					return;
				case "hurt":
					this.hit5CurrentCount = 0;
					if (_loc3_.x == 4 && _loc3_.y == 4)
					{
						this.getBBDC().resetCurFrameStopCount();
					}
					else
					{
						this.bbdc.setFramePointX(4);
						this.bbdc.setFramePointY(4);
					}
					if (this.hit2CurrentCount > 0)
					{
						this.hit2CurrentCount = 0;
					}
					if (this.hit5CurrentCount > 0)
					{
						this.hit5CurrentCount = 0;
					}
					this.bbdc.setState(param1);
			}
		}
		
		override protected function scriptFrameOverFunc(param1:int):void
		{
			var _loc2_:String = this.bbdc.getState();
			switch (_loc2_)
			{
				case "walk":
					this.bbdc.setFramePointX(0);
					return;
				case "run":
					this.bbdc.setFramePointX(0);
					return;
				case "idle":
					this.setAction("idle2");
					return;
				case "idle2":
					this.setAction("idle");
					return;
				case "jump1":
					this.bbdc.setFramePointX(0);
					return;
				case "jump2":
					this.setAction("jump3");
					return;
				case "jump3":
					this.bbdc.setFramePointX(1);
					return;
				case "hit1":
					this.setAction("idle");
					return;
				case "hit3":
					this.resetGravity();
					if (!this.isInSky())
					{
						this.setAction("idle");
						return;
					}
					this.setAction("jump3");
					return;
				case "hit4_1":
					if (!this.isInSky())
					{
						this.setAction("idle");
						return;
					}
					this.setAction("jump3");
					return;
				case "hit4_2":
					if (!this.isInSky())
					{
						this.setAction("idle");
						return;
					}
					this.setAction("jump3");
					return;
				case "hit5":
					this.setAction("idle");
					return;
				case "hit6":
					if (!this.isInSky())
					{
						this.setAction("idle");
						return;
					}
					this.setAction("jump3");
					return;
				case "hit7":
					this.setStatic();
					if (!this.isInSky())
					{
						this.setAction("idle");
						return;
					}
					this.setAction("jump3");
					return;
				case "hit8":
					if (!this.isInSky())
					{
						this.setAction("idle");
						return;
					}
					this.setAction("jump3");
					return;
				case "hit9":
					this.resetGravity();
					if (!this.isInSky())
					{
						this.setAction("idle");
						return;
					}
					this.setAction("jump3");
					return;
				case "hurt":
					this.resetGravity();
					this.setStatic();
					this.setAction("idle");
			}
		}
		
		override protected function enterFrameFunc(param1:Point):void
		{
			var _loc7_:int;
			var _loc2_:* = 0;
			var _loc3_:Boolean;
			var _loc4_:* = null;
			var _loc5_:String = this.bbdc.getState();
			var _loc6_:Point = new Point();
			switch (_loc5_)
			{
				case "hit1":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (param1.x == 1)
						{
							if (this.getPlayer())
							{
								if (this.getPlayer().findSkillIsInTheSkillAry("blb"))
								{
									_loc7_ = gc.needMMP[3][1][(this.player.returnSkillLevelBySkillName("blb") - 1)];
									if (this.roleProperties.mp >= _loc7_ && keyInput.isAttack())
									{
										this.hit2CurrentCount++;
										this.bbdc.resetCurFrameStopCount();
									}
									else
									{
										this.bbdc.setFramePointX(2);
										this.bbdc.resetCurFrameStopCount();
									}
								}
								else
								{
									this.bbdc.setFramePointX(2);
									this.bbdc.resetCurFrameStopCount();
								}
							}
						}
						if (this.bbdc.getCurFrameCount() == 12)
						{
							if (param1.x == 2)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc6_.x = this.x - 50;
								}
								else
								{
									_loc6_.x = this.x + 50;
								}
								_loc6_.y = this.y + 10;
								if (this.hit2NeedCount <= this.hit2CurrentCount)
								{
									this.doHit2(this.getBBDC().getDirect(), _loc6_);
									roleProperties.reduceMp(_loc7_);
								}
								else
								{
									_loc2_ = uint(getTimer());
									this.doHit1(this.getBBDC().getDirect(), _loc6_, _loc2_);
								}
								this.hit2CurrentCount = 0;
								return;
							}
							return;
						}
						return;
					}
					if (param1.x == 1)
					{
						this.bbdc.resetCurFrameStopCount();
						return;
					}
					return;
				case "hit3":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 2)
						{
							if (param1.x == 0)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc6_.x = this.x;
								}
								else
								{
									_loc6_.x = this.x;
								}
								_loc6_.y = this.y + 10;
								this.doHit3(this.getBBDC().getDirect(), _loc6_);
							}
						}
						if (param1.x == 3)
						{
							if (this.bbdc.getCurFrameCount() <= 20 && this.bbdc.getCurFrameCount() % 6 == 0)
							{
								gc.vController.shake(25);
							}
						}
					}
					if (param1.x == 0)
					{
						if (this.bbdc.getCurFrameCount() == 2)
						{
							if (this.role2Shalldow)
							{
								this.role2Shalldow.setAction("hit1");
							}
						}
					}
					this.velocity.y = 0;
					return;
				case "hit4_1":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						_loc3_ = false;
						for each (_loc4_ in this.magicBulletArray)
						{
							if (_loc4_.name == "Role1Bullet4_1")
							{
								this.hit4_2Point.x = _loc4_.x;
								this.hit4_2Point.y = _loc4_.y;
								_loc3_ = true;
								break;
							}
						}
						if (!_loc3_ && this.bbdc.getCurFrameCount() == 1)
						{
							if (param1.x == 0)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc6_.x = this.x - 200;
								}
								else
								{
									_loc6_.x = this.x + 200;
								}
								_loc6_.y = this.y + 10;
								this.doHit4_1(this.getBBDC().getDirect(), _loc6_);
							}
						}
					}
					this.velocity.y = -4;
					return;
				case "hit4_2":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 6)
						{
							if (param1.x == 2)
							{
								_loc6_.x = this.hit4_2Point.x;
								_loc6_.y = this.hit4_2Point.y - 320;
								this.doHit4_2(this.getBBDC().getDirect(), _loc6_);
							}
						}
					}
					this.velocity.y = 0;
					return;
				case "hit5":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (param1.x == 0)
						{
							this.hit5CurrentCount++;
						}
						if (this.bbdc.getCurFrameCount() == 15)
						{
							if (param1.x == 2)
							{
								this.hit5CurrentCount = 0;
								if (this.bbdc.getDirect() == 0)
								{
									_loc6_.x = this.x - 175;
								}
								else
								{
									_loc6_.x = this.x + 175;
								}
								_loc6_.y = this.y - 110;
								this.doHit5(this.getBBDC().getDirect(), _loc6_);
								return;
							}
							return;
						}
						return;
					}
					return;
				case "hit6":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 20)
						{
							if (param1.x == 2)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc6_.x = this.x;
								}
								else
								{
									_loc6_.x = this.x;
								}
								_loc6_.y = this.y - 25;
								this.doHit6(this.getBBDC().getDirect(), _loc6_);
							}
						}
					}
					if (param1.x == 0)
					{
						if (this.bbdc.getCurFrameCount() == 20)
						{
							if (this.role2Shalldow)
							{
								this.role2Shalldow.setAction("hit2");
								return;
							}
							return;
						}
						return;
					}
					this.velocity.y = 0;
					return;
				case "hit7":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 10)
						{
							if (param1.x == 2)
							{
								if (this.getBBDC().getDirect() == 0)
								{
									_loc6_.x = this.x - 210;
								}
								else
								{
									_loc6_.x = this.x + 210;
								}
								_loc6_.y = this.y + 30;
								this.doHit7(this.getBBDC().getDirect(), _loc6_);
								return;
							}
							return;
						}
						return;
					}
					return;
				case "hit8":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 30)
						{
							if (param1.x == 2)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc6_.x = this.x + 5;
								}
								else
								{
									_loc6_.x = this.x - 5;
								}
								_loc6_.y = this.y - 60;
								this.doHit8(this.getBBDC().getDirect(), _loc6_);
							}
						}
					}
					if (param1.x == 2)
					{
						if (this.bbdc.getCurFrameCount() == 30)
						{
							if (this.role2Shalldow)
							{
								this.role2Shalldow.setAction("hit3");
							}
						}
					}
					this.velocity.y = 0;
					return;
				case "hit9":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 55)
						{
							if (param1.x == 3)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc6_.x = this.x - 20;
								}
								else
								{
									_loc6_.x = this.x + 20;
								}
								_loc6_.y = this.y - 20;
								this.doHit9_1(this.getBBDC().getDirect(), _loc6_);
							}
						}
						else
						{
							if (this.bbdc.getCurFrameCount() == 45)
							{
								if (param1.x == 3)
								{
									if (this.bbdc.getDirect() == 0)
									{
										_loc6_.x = this.x - 150;
									}
									else
									{
										_loc6_.x = this.x + 150;
									}
									_loc6_.y = this.y - 150;
									this.doHit9_2(this.getBBDC().getDirect(), _loc6_);
								}
							}
						}
					}
					if (param1.x == 3)
					{
						if (this.bbdc.getCurFrameCount() == 55)
						{
							if (this.role2Shalldow)
							{
								this.role2Shalldow.setAction("hit4");
								return;
							}
							return;
						}
						return;
					}
			}
		}
		
		override protected function exitFrameFunc(param1:Point):void
		{
		}
		
		override public function step():void
		{
			var _loc1_:Boolean;
			super.step();
			if (this.hit2CurrentCount > 0)
			{
				this.exceedPowerSprite.step(this.hit2CurrentCount);
			}
			else
			{
				if (this.hit5CurrentCount > 0)
				{
					this.exceedPowerSprite.step(this.hit5CurrentCount);
				}
			}
			if (this.hit2CurrentCount == 0 && this.hit5CurrentCount == 0)
			{
				this.exceedPowerSprite.clear();
			}
			if (this.role2Shalldow)
			{
				this.role2Shalldow.step();
			}
			if (this.hit2NeedCount == 48 || this.hit5NeedCount == 48)
			{
				if (this.getPlayer())
				{
					_loc1_ = this.getPlayer().findSkillIsInTheSkillAry("sjt");
					if (_loc1_)
					{
						this.hit2NeedCount = 12;
						this.hit5NeedCount = 12;
						bbdc.setFrameStopCount([
							[2, 2, 2, 3, 2, 4],
							[2, 2, 2, 14],
							[4, 4, 4, 4],
							[2, 2, 2, 2],
							[1, 1, 30, 55, 8],
							[2, 2, 2, 2, 2],
							[2, 4, 12],
							[2, 10, 2, 20],
							[2, 2],
							[2, 2, 6],
							[24, 2, 15],
							[2, 2, 20],
							[2, 2, 10]
						]);
						this.exceedPowerSprite.setMaxPower(this.hit2NeedCount);
					}
				}
			}
			else
			{
				if (this.getPlayer())
				{
					_loc1_ = this.getPlayer().findSkillIsInTheSkillAry("sjt");
					if (!_loc1_)
					{
						this.hit2NeedCount = 48;
						this.hit5NeedCount = 48;
						bbdc.setFrameStopCount([
							[2, 2, 2, 3, 2, 4],
							[2, 2, 2, 14],
							[4, 4, 4, 4],
							[2, 2, 2, 2],
							[1, 1, 30, 55, 8],
							[2, 2, 2, 2, 2],
							[2, 4, 12],
							[2, 10, 2, 20],
							[2, 2],
							[2, 2, 6],
							[48, 2, 15],
							[2, 2, 20],
							[2, 2, 10]
						]);
						this.exceedPowerSprite.setMaxPower(this.hit2NeedCount);
					}
				}
			}
		}
		
		override protected function myKeyDown(param1:String):*
		{
			/**
			 * 按键代码：s,j,k,w;
			 */
			var keyStr:String = param1;
			super.myKeyDown(keyStr);
			if (canNextAction)
			{
				switch (keyStr)
				{
					case "0010":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						this.jump();
						canNextAction = false;
						return;
					case "0100":
					case "1100":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						this.normalAttack();
						canNextAction = false;
						return;
					case "1010":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						this.getDownStair();
						canNextAction = false;
						return;
					case "0110":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						canNextAction = false;
						return;
					case "0001":
						if (this.checkTransferDoor())
						{
							gc.pWorld.getBaseLevelListener().keyBoardDownForW(this);
							if (gc.curStage == 8 && gc.curLevel == 1)
							{
								return;
							}
						}
						if (!MainGame.getIns().battleData.levelCleared && this.checkTransferDoor())
						{
							MainGame.getIns().battleData.levelCleared = true;
							gc.keyboardControl.destroy();
							TweenMax.to(gc.gameInfo, 1, {
								"alpha": 0
							});
							TweenMax.to(gc.gameScene, 1, {
								"alpha"     : 0,
								"onComplete": function ():*
								{
									EventManager.getIns().dispatchEvent(GameEventType.GAME_VICTOR);
								}
							});
							return;
						}
				}
			}
		}
		
		override protected function showSkill(index:int = 0):void
		{
			if(!getPlayer()) return;
			var skill:SkillVO = getPlayer().getCurRoleData().getEquippedSkillByIndex(index);
			if(!skill) return;
			var mpCost:int = gc.configManager.skillProxy.getSkillMpCostBySkillId(skill.skillId,skill.skillLevel);
			switch(skill.skillId)
			{
				case "sgq":
					skill_sgq(mpCost);
					break;
				case "myhc":
					skill_myhc(mpCost);
					break;
				case "jgz":
					skill_jgz(mpCost);
					break;
				case "tjgl":
					skill_tjgl(mpCost);
					break;
				case "jhsj":
					skill_jhsj(mpCost);
					break;
				case "blb":
					skill_blb(mpCost);
					break;
				case "xbz":
					skill_xbz(mpCost);
					break;
				case "shy":
					skill_shy(mpCost);
					break;
				case "smb":
					skill_smb(mpCost);
					break;
				case "sjt":
				default:
					break;
			}
			return;
			var _loc2_:* = null;
			var _loc3_:* = 0;
			/*if (this.getPlayer())
			{
				_loc2_ = this.getPlayer().returnSkillNameBySkillKey(param1);
				if (_loc2_)
				{
					param1 = _loc2_[0];
					_loc3_ = uint(parseInt(_loc2_[1]));
					if (param1 == "sgq")
					{
						this.skill_sgq(_loc3_ * 2.653);
					}
					else
					{
						if (param1 == "myhc")
						{
							this.skill_myhc(_loc3_);
						}
						else
						{
							if (param1 == "jgz")
							{
								this.skill_jgz(_loc3_);
							}
							else
							{
								if (param1 == "tjgl")
								{
									this.skill_tjgl(_loc3_);
								}
								else
								{
									if (param1 == "jhsj")
									{
										this.skill_jhsj(_loc3_);
									}
									else
									{
										if (param1 == "blb")
										{
											this.skill_blb(_loc3_ * 2.653);
										}
										else
										{
											if (param1 == "xbz")
											{
												this.skill_xbz(_loc3_);
											}
											else
											{
												if (param1 == "shy")
												{
													this.skill_shy(_loc3_);
												}
												else
												{
													if (param1 == "smb")
													{
														this.skill_smb(_loc3_);
													}
												}
											}
										}
									}
								}
							}
						}
					}
					if (this.curAddEffect.hasEffect(BaseAddEffect.MONSTER65_AOE) || this.curAddEffect.hasEffect(BaseAddEffect.MONSTER129Buff))
					{
						this.reduceHp(_loc3_);
					}
				}
			}*/
		}
		
		override public function normalAttack():void
		{
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.setAction("hit1");
			this.lastHit = "hit1";
			this.normalAttackNum = 0;
			
		}
		
		override public function stepKeyInput():void
		{
			super.stepKeyInput();
			if(keyInput.isAttack())
			{
				if(isRunning())
				{
					normalAttack();
				}
				else
				{
					normalAttack();
				}
			}
		}
		
		override public function refreshTitle():void
		{
			var _loc1_:uint = this.getCurClothId();
			var _loc2_:uint = this.getCurWeaponId();
			var _loc3_:Array = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE2_" + _loc1_);
			if (_loc3_)
			{
				this.bbdc.replaceBitmapDataByName("body", _loc3_);
			}
			_loc3_ = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE2_EQUIP_" + _loc2_);
			if (_loc3_)
			{
				this.bbdc.replaceBitmapDataByName("equip", _loc3_);
			}
			super.refreshTitle();
		}
		
		override public function isNormalHit():Boolean
		{
			return this.curAction == "hit1";
		}
		
		override public function upGrade(param1:Boolean = true):void
		{
			super.upGrade(param1);
			roleProperties.hpMax = 50 + 20 * (roleProperties.level - 1);
			roleProperties.mpMax = 100 + 40 * (roleProperties.level - 1);
			roleProperties.atk = 12 + 8 * (roleProperties.level - 1);
			roleProperties.def = roleProperties.level - 1;
			roleProperties.setFullState();
			roleProperties.initAll();
		}
		
		override public function getRealPower(param1:String, param2:Boolean = true):int
		{
			var _loc3_:int;
			var _loc4_:* = null;
			var _loc5_:* = 1;
			var _loc6_:* = null;
			var _loc7_:Number = 1;
			var _loc8_:int = 1;
			if (this.isGXP)
			{
				_loc5_ = 1.5;
			}
			var _loc9_:int = 1;
			if (param2 && Math.random() <= this.getCrit() / 100)
			{
				_loc9_ = 2;
			}
			var _loc1_0:* = 1;
			if (this.isHit7Ok)
			{
				_loc1_0 = 1 + 0.1 * this.player.returnSkillLevelBySkillName("jgz");
				this.isHit7Ok = false;
			}
			var _loc1_1:* = 1;
			var _loc1_2:Boolean = this.getPlayer().findSkillIsInTheSkillAry("sjt");
			if (_loc1_2)
			{
				_loc1_1 = 1.3;
			}
			var _loc1_3:int = this.player.returnSkillLevelBySkillName("shy");
			switch (param1)
			{
				case "hit1":
					_loc8_ = 1.727 * this.getAtk() * _loc9_ * _loc5_ * _loc1_0;
					break;
				case "hit2":
					_loc7_ = this.player.returnSkillLevelBySkillName("blb");
					_loc8_ = 3.949 * Math.pow(Math.E, 0.221 * _loc7_) + 0.112 * Math.pow(Math.E, 0.194 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc1_0 * _loc1_1;
					break;
				case "hit3":
					_loc7_ = this.player.returnSkillLevelBySkillName("xbz");
					_loc8_ = 31.164 * Math.pow(Math.E, 0.221 * _loc7_) + 0.339 * Math.pow(Math.E, 0.111 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc1_0 * _loc1_1;
					break;
				case "hit3_2":
					_loc7_ = this.player.returnSkillLevelBySkillName("xbz");
					_loc8_ = int(((31.164 * Math.pow(Math.E, 0.221 * _loc7_)) + (((((((0.339 * Math.pow(Math.E, 0.111 * _loc7_)) * this.getAtk()) * _loc9_) * _loc5_) * _loc1_0) * _loc1_1) * _loc1_3)) / 15);
					break;
				case "hit4":
					_loc7_ = this.player.returnSkillLevelBySkillName("smb");
					_loc8_ = 78.985 * Math.pow(Math.E, 0.351 * _loc7_) + 2.227 * Math.pow(Math.E, 0.211 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc1_0 * _loc1_1;
					break;
				case "hit5":
					_loc7_ = this.player.returnSkillLevelBySkillName("sgq");
					_loc8_ = 31.594 * Math.pow(Math.E, 0.261 * _loc7_) + 0.891 * Math.pow(Math.E, 0.188 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc1_0 * _loc1_1;
					break;
				case "hit6":
					_loc7_ = this.player.returnSkillLevelBySkillName("myhc");
					_loc8_ = _loc7_;
					break;
				case "hit7":
					_loc7_ = this.player.returnSkillLevelBySkillName("jgz");
					_loc8_ = _loc7_;
					break;
				case "hit8":
					_loc7_ = this.player.returnSkillLevelBySkillName("tjgl");
					_loc8_ = _loc7_;
					break;
				case "hit9_1":
					_loc7_ = this.player.returnSkillLevelBySkillName("jhsj");
					_loc8_ = 39.353 * Math.pow(Math.E, 0.221 * _loc7_) + 0.375 * Math.pow(Math.E, 0.119 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc1_0 * _loc1_1;
					break;
				case "hit9_2":
					_loc7_ = this.player.returnSkillLevelBySkillName("jhsj");
					_loc8_ = 39.353 * Math.pow(Math.E, 0.221 * _loc7_) + 0.375 * Math.pow(Math.E, 0.119 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc1_0 * _loc1_1;
					break;
				case "hit9_1_2":
					_loc7_ = this.player.returnSkillLevelBySkillName("jhsj");
					_loc8_ = int(((42.353 * Math.pow(Math.E, 0.221 * _loc7_)) + (((((((0.325 * Math.pow(Math.E, 0.119 * _loc7_)) * this.getAtk()) * _loc9_) * _loc5_) * _loc1_0) * _loc1_1) * _loc1_3)) / 15);
					break;
				case "hit9_2_2":
					_loc7_ = this.player.returnSkillLevelBySkillName("jhsj");
					_loc8_ = int(((42.353 * Math.pow(Math.E, 0.221 * _loc7_)) + (((((((0.325 * Math.pow(Math.E, 0.119 * _loc7_)) * this.getAtk()) * _loc9_) * _loc5_) * _loc1_0) * _loc1_1) * _loc1_3)) / 15);
					break;
				case "fabao-sword":
					_loc9_ = 1;
					_loc8_ = this.getAtk();
					break;
				case "magicsword2":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					if (_loc6_ && !(_loc6_.getWX().indexOf("木") == -1))
					{
						_loc8_ = 0.0875 * this.getAtk() * _loc6_.getELevel();
					}
					_loc9_ = 1;
					_loc8_ = this.getAtk() * _loc6_.getELevel() * 0.0488;
					break;
				case "fabao-snow":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					_loc8_ = this.getAtk() * _loc6_.getELevel() * 0.09;
					break;
				case "hitNiumowangSzBuff":
					_loc3_ = 1;
					_loc4_ = this.getPlayer().getCurEquipByType("zbsz");
					if (_loc4_)
					{
						if (_loc4_.equipId == "yxnmwsz")
						{
							_loc3_ = 2;
						}
						else
						{
							if (_loc4_.equipId == "jlnmwsz")
							{
								_loc3_ = 3;
							}
							else
							{
								if (_loc4_.equipId == "ssnmwsz")
								{
									_loc3_ = 4;
								}
							}
						}
					}
					_loc8_ = this.getAtk() * _loc9_ * _loc5_ * ((0.189 * _loc3_) * _loc3_);
					break;
				case "hitZhuanlunwangSzBuff":
					_loc3_ = 1;
					_loc4_ = this.getPlayer().getCurEquipByType("zbsz");
					if (_loc4_)
					{
						if (_loc4_.equipId == "yxzlwsz")
						{
							_loc3_ = 2;
						}
						else
						{
							if (_loc4_.equipId == "jlzlwsz")
							{
								_loc3_ = 3;
							}
							else
							{
								if (_loc4_.equipId == "sszlwsz")
								{
									_loc3_ = 4;
								}
							}
						}
					}
					_loc8_ = this.getAtk() * _loc9_ * _loc5_ * ((0.189 * _loc3_) * _loc3_);
					break;
				case "hitTiantingZhanshenSzBuff":
					_loc5_ = 1;
					_loc6_ = this.getPlayer().getCurEquipByType("zbsz");
					if (_loc6_)
					{
						if (_loc6_.equipId == "yxttzssz")
						{
							_loc5_ = 2;
						}
						else
						{
							if (_loc6_.equipId == "jlttzssz")
							{
								_loc5_ = 3;
							}
							else
							{
								if (_loc6_.equipId == "ssttzssz")
								{
									_loc5_ = 4;
								}
							}
						}
					}
					_loc8_ = this.getAtk() * _loc9_ * _loc5_ * ((0.25 * _loc5_) * _loc5_);
					break;
				case "Pearl":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					if (_loc6_ && !(_loc6_.getWX().indexOf("木") == -1))
					{
						_loc8_ = 1.2 * this.getAtk();
					}
					_loc9_ = 1;
					_loc8_ = this.getAtk() * 0.6;
					break;
				case "fabao-pearl":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					if (_loc6_ && !(_loc6_.getWX().indexOf("木") == -1))
					{
						_loc8_ = _loc6_.getELevel() * 0.0473 * this.getAtk();
					}
					_loc9_ = 1;
					_loc8_ = _loc6_.getELevel() * 0.0315 * this.getAtk();
					break;
				default:
					_loc8_ = 0;
			}
			return _loc8_;
		}
		
		override protected function isCannotMoveWhenAttackOnFloor():Boolean
		{
			return this.curAction == "hit1" || this.curAction == "hit2" || this.curAction == "hit3" || this.curAction == "hit4_1" || this.curAction == "hit4_2" || this.curAction == "hit5" || this.curAction == "hit6" || this.curAction == "hit7" || this.curAction == "hit8" || this.curAction == "hit9";
		}
		
		override protected function isCannotMoveWhenAttack():Boolean
		{
			return this.curAction == "hit8" || this.curAction == "hit6" || this.curAction == "hit9";
		}
		
		override public function reduceHp(param1:int, param2:Boolean = false):void
		{
			super.reduceHp(param1, param2);
		}
		
		override public function isAttacking():Boolean
		{
			return this.curAction == "hit1" || this.curAction == "hit2" || this.curAction == "hit3" || this.curAction == "hit4_1" || this.curAction == "hit4_2" || this.curAction == "hit5" || this.curAction == "hit6" || this.curAction == "hit7" || this.curAction == "hit8" || this.curAction == "hit9";
		}
		
		override public function isCanMoveWhenAttack():Boolean
		{
			return this.curAction == "hit4_1" || this.curAction == "hit4_2" || this.curAction == "hit8" || this.curAction == "hit10" || this.curAction == "hit11_1" || this.curAction == "hit11_2" || this.curAction == "hit13";
		}
		
		override public function destroy():void
		{
			super.destroy();
			if (this.role2Shalldow)
			{
				this.role2Shalldow.destroy();
				this.role2Shalldow = null;
			}
		}
		
		public function doHit3(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role2_hit3");
			this.setStatic();
			this.setLostGravity();
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet3");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y + 40;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setIsDestroyWhenOwnerHurt(false);
			_loc3_.setAction("hit3");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		public function doHit3_2(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role2_hit3");
			this.setStatic();
			this.setLostGravity();
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet3");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y + 40;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setIsDestroyWhenOwnerHurt(false);
			_loc3_.setAction("hit3_2");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		public function doHit6(param1:uint, param2:Point):void
		{
			var direct:uint = param1;
			var p:Point = param2;
			SoundManager.playSound("Role2_hit6");
			var b:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet6");
			b.x = p.x;
			b.y = p.y;
			b.setOwner(this);
			b.setDisable();
			b.setDirect(direct);
			b.setAction("hit6");
			var idx:uint = gc.gameScene.getChildIndex(this);
			gc.gameScene.addChildAt(b, idx);
			this.magicBulletArray.push(b);
			TweenMax.delayedCall(0.9, function (param1:BaseBullet, param2:Role2):*
			{
				var _loc3_:*;
				var _loc4_:Array = gc.team.getHeroArray();
				for each (_loc3_ in _loc4_)
				{
					if (AUtils.GetDisBetweenTwoObj(_loc3_, param1) < 100)
					{
						_loc3_.addCurAddEffect([{
							"name" : BaseAddEffect.CONSTANT_ADD_HP,
							"value": Math.ceil(0.0364 * param2.getAtk() + 2) * player.returnSkillLevelBySkillName("myhc"),
							"time" : 10 * gc.frameClips
						}]);
					}
				}
			}, [b, this]);
		}
		
		public function doHit8(param1:uint, param2:Point):void
		{
			var b:SpecialEffectBullet;
			var beishu:Number;
			b = null;
			var direct:uint = param1;
			var p:Point = param2;
			SoundManager.playSound("Role2_hit8");
			b = new SpecialEffectBullet("Role2Bullet8");
			b.x = p.x;
			b.y = p.y;
			b.setOwner(this);
			b.setDisable();
			b.setDirect(direct);
			b.setAction("hit8");
			var idx:uint = gc.gameScene.getChildIndex(this);
			gc.gameScene.addChildAt(b, idx);
			this.magicBulletArray.push(b);
			var sl:int = this.player.returnSkillLevelBySkillName("tjgl");
			beishu = 0.071 * sl;
			if (gc.sid == this.sid || gc.isSingleGame())
			{
				TweenMax.delayedCall(0.1, function (param1:SpecialEffectBullet):*
				{
					var _loc2_:* = null;
					var _loc3_:* = 0;
					var _loc4_:Array = gc.team.getHeroArray();
					var _loc5_:uint = _loc4_.length;
					var _loc6_:int = 0;
					while (_loc6_ < _loc5_)
					{
						_loc2_ = (_loc4_[_loc6_] as BaseHero);
						_loc3_ = uint(_loc2_.getSHHP() * beishu);
						if (this.isGXP)
						{
							_loc3_ = uint(_loc3_ * 1.5);
						}
						if (AUtils.GetDisBetweenTwoObj(_loc2_, b) <= 150)
						{
							_loc2_.cureHp(_loc3_);
						}
						if (_loc2_.getPet())
						{
							if (AUtils.GetDisBetweenTwoObj(_loc2_.getPet(), b) <= 150)
							{
								_loc2_.getPet().cureHp(_loc3_);
							}
						}
						_loc6_++;
					}
				}, [b]);
			}
			var hf:int = roleProperties.hpMax * beishu + 10 * sl;
			var yichu:int = (roleProperties.hp + hf) - roleProperties.hpMax;
			if (yichu > 0)
			{
				if (this.player.returnSkillLevelBySkillName("tjgl") == 10)
				{
					this.addCurAddEffect([{
						"name"       : BaseAddEffect.SHIELD,
						"time"       : gc.frameClips * 10,
						"defendValue": yichu
					}]);
				}
			}
		}
		
		public function doHit8_2(param1:uint, param2:Point):void
		{
			var b:SpecialEffectBullet;
			var beishu:Number;
			b = null;
			var direct:uint = param1;
			var p:Point = param2;
			SoundManager.playSound("Role2_hit8");
			b = new SpecialEffectBullet("Role2Bullet8");
			b.x = p.x;
			b.y = p.y;
			b.setOwner(this);
			b.setDisable();
			b.setDirect(direct);
			b.setAction("hit8_2");
			var idx:uint = gc.gameScene.getChildIndex(this);
			gc.gameScene.addChildAt(b, idx);
			this.magicBulletArray.push(b);
			var sl:int = this.player.returnSkillLevelBySkillName("tjgl");
			var shy:int = this.player.returnSkillLevelBySkillName("shy");
			beishu = ((0.07 * sl) * shy) / 18;
			if (gc.sid == this.sid || gc.isSingleGame())
			{
				TweenMax.delayedCall(0.1, function (param1:SpecialEffectBullet):*
				{
					var _loc2_:* = null;
					var _loc3_:* = 0;
					var _loc4_:Array = gc.team.getHeroArray();
					var _loc5_:uint = _loc4_.length;
					var _loc6_:int = 0;
					while (_loc6_ < _loc5_)
					{
						_loc2_ = (_loc4_[_loc6_] as BaseHero);
						_loc3_ = uint(_loc2_.roleProperies.getSHHP() * beishu);
						if (this.isGXP)
						{
							_loc3_ = uint(_loc3_ * 1.5);
						}
						if (AUtils.GetDisBetweenTwoObj(_loc2_, b) <= 150)
						{
							_loc2_.cureHp(_loc3_);
						}
						if (_loc2_.getPet())
						{
							if (AUtils.GetDisBetweenTwoObj(_loc2_.getPet(), b) <= 150)
							{
								_loc2_.getPet().cureHp(_loc3_);
							}
						}
						_loc6_++;
					}
				}, [b]);
			}
			var hf:int = this.roleProperties.hpMax * beishu + 10 * sl;
			var yichu:int = (this.roleProperties.hp + hf) - this.roleProperties.hpMax;
			if (yichu > 0)
			{
				if (this.player.returnSkillLevelBySkillName("tjgl") == 10)
				{
					this.addCurAddEffect([{
						"name"       : BaseAddEffect.SHIELD,
						"time"       : gc.frameClips * 10,
						"defendValue": yichu
					}]);
				}
			}
		}
		
		public function doHit9_1(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role2_hit9");
			this.setLostGravity();
			this.setStatic();
			this.velocity.y = 0;
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet9_1");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setIsDestroyWhenOwnerHurt(true);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit9_1");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		public function doHit9_2(param1:uint, param2:Point):void
		{
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet9_2");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setIsDestroyWhenOwnerHurt(true);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit9_2");
			gc.gameScene.addChild(_loc3_);
			var _loc4_:uint = gc.gameScene.getChildIndex(this);
			gc.gameScene.addChildAt(_loc3_, _loc4_);
			this.magicBulletArray.push(_loc3_);
		}
		
		public function doHit9_1_2(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role2_hit9");
			this.setLostGravity();
			this.setStatic();
			this.velocity.y = 0;
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet9_1");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setIsDestroyWhenOwnerHurt(true);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit9_1_2");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		public function doHit9_2_2(param1:uint, param2:Point):void
		{
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet9_2");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setIsDestroyWhenOwnerHurt(true);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit9_2_2");
			gc.gameScene.addChild(_loc3_);
			var _loc4_:uint = gc.gameScene.getChildIndex(this);
			gc.gameScene.addChildAt(_loc3_, _loc4_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit1(param1:uint, param2:Point, param3:uint):void
		{
			SoundManager.playSound("Role2_hit1");
			if (this.sid != gc.sid)
			{
				this.bbdc.setFramePointX(2);
				this.bbdc.resetCurFrameStopCount();
			}
			var _loc4_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet1");
			_loc4_.x = param2.x;
			_loc4_.y = param2.y;
			_loc4_.setOwner(this);
			_loc4_.setDirect(param1);
			_loc4_.setAction("hit1");
			gc.gameScene.addChild(_loc4_);
			this.magicBulletArray.push(_loc4_);
		}
		
		private function doHit2(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role2_hit2");
			if (this.sid != gc.sid)
			{
				this.bbdc.setFramePointX(2);
				this.bbdc.resetCurFrameStopCount();
			}
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet2");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit2");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit4_1(param1:uint, param2:Point):void
		{
			var _loc3_:EnemyMoveBullet = new EnemyMoveBullet("Role2Bullet4_1");
			_loc3_.name = "Role1Bullet4_1";
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			if (param1 == 0)
			{
				_loc3_.setSpeed(-10);
			}
			else
			{
				_loc3_.setSpeed(10);
			}
			_loc3_.setDistance(9999);
			_loc3_.setIsDestroyWhenOwnerHurt(true);
			_loc3_.setOwner(this);
			_loc3_.setDisable();
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit4");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit4_2(param1:uint, param2:Point):void
		{
			var direct:uint = param1;
			var p:Point = param2;
			SoundManager.playSound("Role2_hit4");
			var b:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet4_2");
			if (direct == 0)
			{
				b.x = p.x + 50;
			}
			else
			{
				b.x = p.x - 50;
			}
			b.y = p.y;
			b.setOwner(this);
			b.setDirect(direct);
			b.setAction("hit4");
			gc.gameScene.addChild(b);
			this.magicBulletArray.push(b);
			TweenMax.delayedCall(0.75, function (param1:Role2):*
			{
				param1.resetGravity();
				gc.vController.shake(20);
				gc.vController.shine(0x0099CC);
			}, [this]);
		}
		
		private function doHit5(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role2_hit5");
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet5");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit5");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit7(param1:uint, param2:Point):void
		{
			var hit7Point:Point;
			var bmLen:uint;
			var bo:BaseObject;
			var i:uint;
			var direct:uint = param1;
			var p:Point = param2;
			SoundManager.playSound("Role2_hit7");
			var b:SpecialEffectBullet = new SpecialEffectBullet("Role2Bullet7");
			b.x = p.x;
			b.y = p.y;
			b.setOwner(this);
			b.setDisable();
			b.setDirect(direct);
			b.setAction("hit7");
			gc.gameScene.addChild(b);
			this.magicBulletArray.push(b);
			if (gc.sid == this.sid || gc.isSingleGame())
			{
				hit7Point = new Point();
				if (direct == 0)
				{
					hit7Point.x = this.x - 200;
				}
				else
				{
					hit7Point.x = this.x + 200;
				}
				hit7Point.y = this.y - 70;
				gc.oppositeArray = gc.pWorld.getMonsterArray();
				bmLen = gc.oppositeArray.length;
				i = 0;
				while (i < bmLen)
				{
					bo = (gc.oppositeArray[i] as BaseObject);
					if (!bo.isInvincible())
					{
						if(bo is BaseMonster && (bo as BaseMonster).mavo.isStatic) goto logicSkip
						if (AUtils.GetDisBetweenTwoObj(b, bo) <= 240)
						{
							bo.setLostGravity();
							TweenMax.to(bo, 0.625, {
								"x"               : hit7Point.x,
								"y"               : hit7Point.y - 30,
								"onComplete"      : function (param1:BaseObject):*
								{
									param1.resetGravity();
									if (!param1.isDead())
									{
										TweenMax.to(param1, 0.625, {
											"x": param1.x,
											"y": param1.y - 10
										});
									}
								},
								"onCompleteParams": [bo]
							});
						}
						logicSkip:
							bo.resetGravity();
					}
					i++;
				}
			}
			this.isHit7Ok = true;
		}
		
		private function doHit10(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role2_hit10");
			if (!this.role2Shalldow)
			{
				this.role2Shalldow = new Role2Shadow(this);
				this.role2Shalldow.x = param2.x;
				this.role2Shalldow.y = param2.y;
				this.role2Shalldow.setDirect(param1);
				gc.gameScene.addChild(this.role2Shalldow);
			}
			else
			{
				this.x = this.role2Shalldow.x;
				this.y = this.role2Shalldow.y;
				this.role2Shalldow.destroy();
				this.role2Shalldow = null;
			}
		}
		
		private function skill_sgq(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.setAction("hit5");
			this.curAction = "hit5";
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_myhc(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.setAction("hit6");
			this.lastHit = "hit6";
			
			this.normalAttackNum = 0;
			roleProperties.reduceMp(param1);
		}
		
		private function skill_jgz(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.setAction("hit7");
			this.curAction = "hit7";
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_tjgl(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.setAction("hit8");
			this.lastHit = "hit8";
			
			this.normalAttackNum = 0;
			roleProperties.reduceMp(param1);
		}
		
		private function skill_jhsj(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.setAction("hit9");
			this.curAction = "hit9";
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_blb(param1:uint):void
		{
		}
		
		private function skill_xbz(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.setAction("hit3");
			this.curAction = "hit3";
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_shy(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.doHit10(this.getBBDC().getDirect(), new Point(this.x, this.y));
			if (this.role2Shalldow)
			{
				roleProperties.reduceMp(param1);
			}
		}
		
		private function skill_smb(param1:uint):void
		{
			var _loc2_:*;
			if (!this.isAttacking())
			{
				if (this.roleProperties.mp < param1)
				{
					return;
				}
			}
			if (!(this.curAction == "hit4_1") && !this.standInObj || this.isAttacking() && !(this.curAction == "hit4_1") || this.isBeAttacking())
			{
				return;
			}
			var _loc3_:Boolean;
			for each (_loc2_ in this.magicBulletArray)
			{
				if (_loc2_.name == "Role1Bullet4_1")
				{
					this.hit4_2Point.x = _loc2_.x;
					this.hit4_2Point.y = _loc2_.y;
					_loc3_ = true;
					break;
				}
			}
			if (this.curAction != "hit4_1")
			{
				this.setAction("hit4_1");
				this.lastHit = "hit4_1";
				
				this.hit4_2Point.x = -99;
				this.hit4_2Point.y = -99;
				roleProperties.reduceMp(param1);
			}
			else
			{
				if (_loc3_)
				{
					this.setAction("hit4_2");
					this.lastHit = "hit4_2";
					
				}
			}
		}
		
	}
} // package export.hero